home *** CD-ROM | disk | FTP | other *** search
- _root.vases.gotoAndStop(_root.misses + 1);
- if(_root.time == 0 && _root.milliseconds == 0)
- {
- _root.gotoAndStop("win");
- _parent.gotoAndStop("win");
- }
- else if(_root.vases._currentFrame == 4)
- {
- _root.gotoAndStop("lose");
- _parent.gotoAndStop("lose");
- }
- if(Key.isDown(Key.RIGHT))
- {
- _parent.right = _parent.right + 1;
- }
- else
- {
- _parent.right = 0;
- }
- if(Key.isDown(Key.LEFT))
- {
- _parent.left = _parent.left + 1;
- }
- else
- {
- _parent.left = 0;
- }
- if(_root.control != "mouse")
- {
- if((Key.isDown(Key.RIGHT) || Key.isDown(Key.LEFT)) && (_parent._x < 370 && 30 < _parent._x))
- {
- if(_parent._currentFrame == 1)
- {
- _parent.gotoAndStop("walk");
- }
- }
- else if(_parent._currentFrame == 2)
- {
- _parent.gotoAndStop("stand");
- }
- if(Key.isDown(Key.RIGHT) && (_parent.left == 0 || _parent.right < _parent.left))
- {
- _parent._x += _root.speed;
- }
- if(Key.isDown(Key.LEFT) && (_parent.right == 0 || _parent.left < _parent.right))
- {
- _parent._x -= _root.speed;
- }
- }
- else
- {
- if((_root._xmouse < _parent._x - _root.speed || _parent._x + _root.speed < _root._xmouse) && (_parent._x < 370 && 30 < _parent._x))
- {
- if(_parent._currentFrame == 1)
- {
- _parent.gotoAndStop("walk");
- }
- }
- else if(_parent._currentFrame == 2)
- {
- _parent.gotoAndStop("stand");
- }
- if(_parent._x + _root.speed < _root._xmouse)
- {
- _parent._x += _root.speed;
- }
- else if(_root._xmouse < _parent._x - _root.speed)
- {
- _parent._x -= _root.speed;
- }
- }
- if(370 < _parent._x)
- {
- _parent._x = 370;
- }
- else if(_parent._x < 30)
- {
- _parent._x = 30;
- }
-